<?

/**
* Use $_SESSION["GDate"] if you are using custom date
* or just use the system date 
*
* $today_date = $_SESSION["GDate"];
* $today_date = date("d-m-Y");
*
*/
$today_date		  = date("d-m-Y");

$thisSequence   = "ACCESS_SEQ";

$srcDbHdr      = "USER_ACCESS";
$srcDbDtl      = "USER_ACCESS";
$srcDbHdrLog   = "LOG_USER_ACCESS";
$srcDbSequence = "MST_SEQUENCE";

$UID     = unserialize($_SESSION["serUID"]);

$userId  = $UID->getUID();

$Db = new oracleDb;
$Db->init($_SESSION["ORCLU"], 
           $_SESSION["OPASS"],
           $_SESSION["SID"],
           _NO_COMMENT);

if($Db->connect()){
    
  for($iRow = 0; $iRow < $dataup; $iRow++){
  	
  	$values = " '".$_POST["levelMnEnt"][$iRow]."',  ".
  	          " '".$_POST["descpEnt"][$iRow]."',    ".
					  	" '".$_POST["progEnt"][$iRow]."',     ".
					  	" '".$_POST["statusEnt"][$iRow]."'    ";
  	
  	$CLHandlers->insToDtl($Db,
  	                      $values,
  	                      $srcDbDtl);
  }
	
	$Db->commit();
	
	if($Db->getStatus()){
	
	  $Misc->usrMsg("Upload Complete");
	}else{
	  
	  $Misc->usrDieJs("Upload Process Interupted");
	}
	
	$Db->dc();
	
	/**
	* Pending...
	* I'm not sure if this 
	* reset procedure off
	* causes buggy 
	*
	*	$restore  = 0;
	* $uprun    = 0;
	* $dataup   = 0;
	*
	*/
	
	//jumpTo(2,"../".$_SESSION["source_caller"]);
	
}else{
	
	$Misc->usrDieJs("Db connection failed");
}

?> 